Optimal. Leaf size=65 \[ \frac{(2 a+b) \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac{b \sinh (x) \cosh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0574036, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {3184, 12, 3181, 208} \[ \frac{(2 a+b) \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac{b \sinh (x) \cosh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3184
Rule 12
Rule 3181
Rule 208
Rubi steps
\begin{align*} \int \frac{1}{\left (a+b \cosh ^2(x)\right )^2} \, dx &=-\frac{b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}-\frac{\int \frac{-2 a-b}{a+b \cosh ^2(x)} \, dx}{2 a (a+b)}\\ &=-\frac{b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}+\frac{(2 a+b) \int \frac{1}{a+b \cosh ^2(x)} \, dx}{2 a (a+b)}\\ &=-\frac{b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}+\frac{(2 a+b) \operatorname{Subst}\left (\int \frac{1}{a-(a+b) x^2} \, dx,x,\coth (x)\right )}{2 a (a+b)}\\ &=\frac{(2 a+b) \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac{b \cosh (x) \sinh (x)}{2 a (a+b) \left (a+b \cosh ^2(x)\right )}\\ \end{align*}
Mathematica [A] time = 0.213622, size = 68, normalized size = 1.05 \[ \frac{(2 a+b) \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{2 a^{3/2} (a+b)^{3/2}}-\frac{b \sinh (2 x)}{2 a (a+b) (2 a+b \cosh (2 x)+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.036, size = 230, normalized size = 3.5 \begin{align*} -2\,{\frac{1}{ \left ( \tanh \left ( x/2 \right ) \right ) ^{4}a+b \left ( \tanh \left ( x/2 \right ) \right ) ^{4}-2\,a \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+2\, \left ( \tanh \left ( x/2 \right ) \right ) ^{2}b+a+b} \left ( 1/2\,{\frac{ \left ( \tanh \left ( x/2 \right ) \right ) ^{3}b}{a \left ( a+b \right ) }}+1/2\,{\frac{\tanh \left ( x/2 \right ) b}{a \left ( a+b \right ) }} \right ) }+{\frac{1}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ) \left ( a+b \right ) ^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a}}}}-{\frac{1}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ) \left ( a+b \right ) ^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a}}}}+{\frac{b}{4}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){a}^{-{\frac{3}{2}}} \left ( a+b \right ) ^{-{\frac{3}{2}}}}-{\frac{b}{4}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){a}^{-{\frac{3}{2}}} \left ( a+b \right ) ^{-{\frac{3}{2}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.38822, size = 3090, normalized size = 47.54 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.22918, size = 140, normalized size = 2.15 \begin{align*} \frac{{\left (2 \, a + b\right )} \arctan \left (\frac{b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt{-a^{2} - a b}}\right )}{2 \,{\left (a^{2} + a b\right )} \sqrt{-a^{2} - a b}} + \frac{2 \, a e^{\left (2 \, x\right )} + b e^{\left (2 \, x\right )} + b}{{\left (a^{2} + a b\right )}{\left (b e^{\left (4 \, x\right )} + 4 \, a e^{\left (2 \, x\right )} + 2 \, b e^{\left (2 \, x\right )} + b\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]